<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>业务中心</title>
    <script type="text/javascript" src="/static/Js/jQuery-3.5.1.js"></script>
    <script type="text/javascript" src="/static/Js/socket.io.js"></script>
    <script type="text/javascript" src="/static/Js/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/Js/GetUserParam.js"></script>
    <script type="text/javascript" src="/static/Js/UserFullNameWaterMark.js"></script>
    <script type="text/javascript" src="/static/Js/watermark.js"></script>


    <link rel="stylesheet" href="/static/Css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/Css/CommonStyles.css">
    <style>
        .imgSc{
            margin-top: 10px;
        }
        .cardText {
            background-color: white;
            margin-top: 1px;
            padding-right: 5px;
            padding-left: 5px;
            border: 1px gray solid;

            box-shadow: 0 3px 3px gray;
            border-radius: 25px;
        }
        .cardImg{
            margin-bottom: 5px;
            box-shadow: 0 3px 3px gray;
            border: 4px white solid;

        }
        .imgSc{
            text-align: center;
        }
    </style>

</head>
<body id="bg_body" >
<div id="header"></div>
<div class="container" >
    <div class="row" >

        <div class="sidBar" style="padding: 0;margin-left: 0;" >
            <div style="background-color:rgba(255,255,255,0.8); height: calc(100vh - 66px);" id="messageSidBar_ul_div">
                <ul style="position: absolute;width: 100%" id="messageSidBar_ul">
                    <li  onclick="gotoMessageCenter()"  class="card_Li" id="card_Li_00" style=" position: relative;margin-left: 4%;margin-top: 10%;width: 90%;height: 40px">
                        <img class="messagePageIcon" id="messagePageIcon" src="/static/Img/PageImg/plane.png" alt="">
                        <span class="messageCenterText" id="messageCenterText00">业务中心</span>
                    </li>
                </ul>
                <ul style="position: absolute;width: 100%;margin-top: 100px" id="messageSidBar_ul02" >

                </ul>
            </div>
        </div>
        <div class="bigCard" style="padding-left: 10px;" >
            <div style="background-color: rgba(255,255,255,0.6);height: calc(100vh - 66px);">
                <ul style="position: absolute;width: 100%;z-index: 9999" id="messageSidBar_ul001">
                    <li class="card_Li card_Li0001" id="card_Li_0001" style=" position: relative;margin-left: 3%;margin-top: 10px;height: 40px">

                        <span class="messageCenterText messageCenterText0001" id="messageCenterText0001" >业务广场</span>
                    </li>
                </ul>
                <div style="overflow-y: auto;position: absolute;width: 99% ;height: 100%;margin-right: -5%"  >
                    <ul style="position: relative;width: 100% ;height: 100%" id="messageSidBar_ul0001" >
                        <!--<li class="NormalMessages" id="card_Li_00011" style=" position: relative;margin-left: 6%;margin-top: 10px;height: 40px">
                            <span class="messageCenterText messageCenterText0001 NormalMessagesNum" id="messageCenterText00011" >1</span>
                            <span class="messageCenterText messageCenterText0001 NormalMessagesTime NormalMessagesNum" id="messageCenterText00012" >1</span>
                            <input type="text" style="border: none" readonly="readonly"  value="" class="messageCenterText messageCenterText0001 NormalMessagesText NormalMessagesNum" id="messageCenterText00013" >
                            <button type="button" class="btn btn-success reLoadBtn" hidden><span style="margin-top: 1px">重新提交</span></button>
                            <button type="button" class="btn btn-info detailedBtn"><span style="margin-top: 1px">详细</span></button>
                            <button type="button" class="btn btn-danger"><span style="margin-top: 1px">删除</span></button>
                        </li>-->
                    </ul>
                </div>
            </div>
        </div>

    </div>
</div>




<script>
    $(function () {
        BusinessCenter()
        UserFullNameWaterMark()

    })
    function getPageUrl() {
        return window.location.pathname
    }
    $.get('./HeadPage.html',function(data){
        $("#header").html(data)
    })
    $.get("./Toasts.html",function (data){
        $("#ToastsPage").html(data)
    })
    function BusinessCenter() {
        $.post("/businessCenter/findBusiness",{},function (result) {
            if (result.flag) {
            let arr = result.data
                for (const arrElement of arr) {
                    let str ='<div style="display: inline-block; ;margin-left: 6%;float: left" onclick="' + arrElement.sfun + '">'
                        + '<div class="imgSc">'
                        + '<img class="cardImg" style="opacity: .8;border-radius: 25px" src=' + arrElement.imgUrl+ '  height="130" width="120">'
                        + '<br id="one1">'
                        + '<span class="cardText">'
                        + arrElement.sname
                        + '</span>'
                        + '</div>'
                        + '</div>'
                        + '<script>'
                        + ' function ' + arrElement.sfun + '{'
                        + '     window.location.href ="' + arrElement.saddress + '";'
                        + ' }'
                        + ' <\/script>'
                        + '</li>';

                    $("#messageSidBar_ul0001").append(str)

                }
            }else {
                $("#messageCenterText0001").text(result.errorMsg)
                $("#messageCenterText0001").css("color","orange")
                setTimeout(function (){
                    $("#messageCenterText0001").text("系统消息")
                    $("#messageCenterText0001").css("color","rgb(255,255,255)")
                },3000)
            }
        })
    }
</script>
</body>
</html>